﻿using Ingenious.Graph;
using Ingenious.MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ingenious.Core.TestHarness
{
    public class NodeViewModelList<TTripleId> : ViewModelList<NodeViewModelItem<TTripleId>, INode<TTripleId>>
    {
        private bool m_isSelected;
        private bool m_isExpanded;

        #region Object Lifetime
        public NodeViewModelList(IViewModel parent)
            : base(parent)
        {
        }

        public NodeViewModelList(IViewModel parent, IObservableModelList modelList)
            : base(parent, modelList)
        {
        }
        #endregion

        protected override NodeViewModelItem<TTripleId> OnWrapModelItem(INode<TTripleId> item)
        {
            return new NodeViewModelItem<TTripleId>(this, item);
        }

        #region Properties
        public bool IsSelected
        {
            get { return m_isSelected; }
            set
            {
                if (m_isSelected != value)
                {
                    m_isSelected = value;
                    
                    
                }
            }
        }

        public bool IsExpanded
        {
            get { return m_isExpanded; }
            set
            {
                if (m_isExpanded != value)
                {
                    m_isExpanded = value;
                    OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs("IsExpanded"));
                }
            }
        }
        #endregion
    }
}
